## ---------------------------------------------------------------------- #
## Figure 3
## Christopher J. Fariss
## "Yes, Human Rights Practices Are Improving Over Time"
## American Political Science Review
## ---------------------------------------------------------------------- #
rm(list = ls())

par(mfrow=c(1,3), mar=c(2,3.5,2,.25))

data <- read.csv("M_All_Vary_Full_Data.csv")
boxplot(data$theta_mean ~ data$YEAR, ylim=c(-4.5,4.5), pch=".", yaxt="n", xaxt="n")
axis(side=1, at=c(1:length(1946:2015)), labels=rep("", length(1946:2015)))
axis(side=1, at=c(6,16,26,36,46,56,66), labels=c(1950,1960,1970,1980,1990,2000,2010))
axis(side=2, at=c(-4,-3,-2,-1,0,1,2,3,4), las=2, cex=1.25)
mtext(side=3, line=.25, "All Varying Standard", cex=1.25)
mtext(side=1, line=-2, "Cingranelli and Fillippov\n(2018)", cex=1.25)
mtext(side=2, line=2, "Latent Variable Estimates", cex=1.25)

data <- read.csv("M_1_Full_Data.csv")
boxplot(data$theta_mean ~ data$YEAR, ylim=c(-4.5,4.5), pch=".", yaxt="n", xaxt="n")
axis(side=1, at=c(1:length(1946:2015)), labels=rep("", length(1946:2015)))
axis(side=1, at=c(6,16,26,36,46,56,66), labels=c(1950,1960,1970,1980,1990,2000,2010))
axis(side=2, at=c(-4,-3,-2,-1,0,1,2,3,4), las=2, cex=1.25)
mtext(side=3, line=.25, "Constant Standard", cex=1.25)
mtext(side=1, line=-2, "Fariss\n(2014, 2019)", cex=1.25)

data <- read.csv("M_2_Full_Data.csv")
boxplot(data$theta_mean ~ data$YEAR, ylim=c(-4.5,4.5), pch=".", yaxt="n", xaxt="n")
axis(side=1, at=c(1:length(1946:2015)), labels=rep("", length(1946:2015)))
axis(side=1, at=c(6,16,26,36,46,56,66), labels=c(1950,1960,1970,1980,1990,2000,2010))
axis(side=2, at=c(-4,-3,-2,-1,0,1,2,3,4), las=2, cex=1.25)
mtext(side=3, line=.25, "Changing Standard", cex=1.25)
mtext(side=1, line=-2 , "Fariss\n(2014, 2019)", cex=1.25)





